{% extends "restaurant_manage/main.html" %}
{% block script %}
  <script>	
  	$(function() {
		$( "#accordion_menu" ).accordion({
			collapsible: true,			
			active: -1,
			autoHeight: false,
		});		
		$( "#accordion_order" ).accordion({
			collapsible: true,			
			active: -1,
			autoHeight: false,
		});
	});
  </script>
{% endblock %}

{% block content %}
  {% if restaurant.username %}
    <table id="restaurant_menu">
    {% for c in categories %}
        <tr><td><a class="category_name">{{c.name}}</a></td></tr>
        {% for i in c.get_menu_items %}
            <tr class="item_div">
            	<td>
            		<a id="{{i.id}}">{{i.name}}</a>
            	</td>
            	<td><a>{{i.price}}</a></td>
            </tr>
        {% endfor %}
    {% endfor %}
    </table>    
  {% else %}
    <p>You are not a restaurant user.</p>
  {% endif %}
{% endblock %}